# Maintainer: tobias <tobias@justdreams.de>
# Modified by: eliott <eliott@cactuswax.net>
# Original by Benjamin Andresen, klapmuetz [at] gmail [dot] com

pkgname=fcgi
pkgver=2.4.2
pkgrel=2
depends=('gcc-libs')
pkgdesc='FASTCgi (fcgi) is a language independent, high performant extension to CGI'
arch=('x86_64')
license=('custom')
options=('!makeflags')
url='http://www.fastcgi.com/'
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/FastCGI-Archives/fcgi2/archive/${pkgver}.tar.gz")
sha256sums=('1fe83501edfc3a7ec96bb1e69db3fd5ea1730135bd73ab152186fd0b437013bc')

prepare() {
  cd "${srcdir}/fcgi2-${pkgver}"

  ./autogen.sh
}

build() {
  cd "${srcdir}/fcgi2-${pkgver}"

  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/fcgi2-${pkgver}"

  make DESTDIR="${pkgdir}" install
  install -Dm0644 LICENSE.TERMS "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
